//
//  CategoryCell.swift
//  ListenFM
//
//  Created by 胡定锋Mac on 2017/8/8.
//  Copyright © 2017年 胡定锋. All rights reserved.
//

import UIKit

class CategoryCell: UICollectionViewCell {

    
    @IBOutlet weak var imageview: UIImageView!
    
    @IBOutlet weak var titleLabel: UILabel!
    
    var categoryModel:categorySubModel?{
        didSet{
            guard let iconURL = URL(string : (categoryModel?.cover)!) else {return}
            imageview.kf.setImage(with: iconURL)
            
            titleLabel.text = categoryModel?.name
            
        }
    }
    
    
    var diantaiModel:diantaiSubModel?{
        didSet{
            guard let iconURL = URL(string : (diantaiModel?.cover)!) else {return}
            imageview.kf.setImage(with: iconURL)
            
            titleLabel.text = diantaiModel?.title
            
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        
    }

}
